/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package vista;

import java.awt.Toolkit;
import java.awt.event.ActionListener;

/**
 *
 * @author Andrés
 */
public class VistaSeleccionMonitor extends javax.swing.JFrame {

    /**
     * Creates new form VistaSeleccionMonitor
     */
    public VistaSeleccionMonitor() {
        initComponents();
        setVisible(false);
        setLocationRelativeTo(null);
        iniciarLogo();
        setDefaultCloseOperation(EXIT_ON_CLOSE);
        this.setResizable(false);
    }

    public final void iniciarLogo() {
        setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource("./image/logo.png")));
    }

    public void agregarListenerItemCerrar(ActionListener actionListener) {
        this.itemCerrar.addActionListener(actionListener);
    }

    public void agregarListenerBotonTablespaces(ActionListener actionListener) {
        this.botonTablespaces.addActionListener(actionListener);
    }

    public void agregarListenerBotonCpu(ActionListener actionListener) {
        this.botonCpu.addActionListener(actionListener);
    }

    public void agregarListenerBotonRespaldos(ActionListener actionListener) {
        this.botonRespaldos.addActionListener(actionListener);
    }
    
    public void agregarListenerBotonUsuarios(ActionListener actionListener) {
        this.botonUsuarios.addActionListener(actionListener);
    }
    
    public void agregarListenerItemAcerdaDe(ActionListener actionListener) {
        this.itemAcercaDe.addActionListener(actionListener);
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        botonTablespaces = new javax.swing.JButton();
        botonCpu = new javax.swing.JButton();
        jLabel1 = new javax.swing.JLabel();
        botonUsuarios = new javax.swing.JButton();
        botonRespaldos = new javax.swing.JButton();
        jMenuBar1 = new javax.swing.JMenuBar();
        menuArchivo = new javax.swing.JMenu();
        itemCerrar = new javax.swing.JMenuItem();
        menuAyuda = new javax.swing.JMenu();
        itemAcercaDe = new javax.swing.JMenuItem();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("Monitor Administración Bases de Datos");

        botonTablespaces.setIcon(new javax.swing.ImageIcon(getClass().getResource("/vista/image/1373832_10200843554320125_925319053_t.jpg"))); // NOI18N
        botonTablespaces.setText("Consumo Tablespaces");
        botonTablespaces.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                botonTablespacesActionPerformed(evt);
            }
        });

        botonCpu.setIcon(new javax.swing.ImageIcon(getClass().getResource("/vista/image/icon_64x64.png"))); // NOI18N
        botonCpu.setText("Consumo CPU");

        jLabel1.setText("Seleccione el monitor que desea: ");

        botonUsuarios.setIcon(new javax.swing.ImageIcon(getClass().getResource("/vista/image/usuarios.png"))); // NOI18N
        botonUsuarios.setText("Control Usuarios");

        botonRespaldos.setIcon(new javax.swing.ImageIcon(getClass().getResource("/vista/image/calendario.png"))); // NOI18N
        botonRespaldos.setText("Calendarizador");

        menuArchivo.setText("Archivo");

        itemCerrar.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_X, java.awt.event.InputEvent.CTRL_MASK));
        itemCerrar.setText("Cerrar");
        menuArchivo.add(itemCerrar);

        jMenuBar1.add(menuArchivo);

        menuAyuda.setText("Ayuda");

        itemAcercaDe.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_H, java.awt.event.InputEvent.CTRL_MASK));
        itemAcercaDe.setText("Acerca de");
        menuAyuda.add(itemAcercaDe);

        jMenuBar1.add(menuAyuda);

        setJMenuBar(jMenuBar1);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(jLabel1)
                        .addGap(0, 0, Short.MAX_VALUE))
                    .addGroup(layout.createSequentialGroup()
                        .addGap(23, 23, 23)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(botonUsuarios, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(botonTablespaces, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(layout.createSequentialGroup()
                                .addGap(0, 1, Short.MAX_VALUE)
                                .addComponent(botonCpu, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                            .addGroup(layout.createSequentialGroup()
                                .addComponent(botonRespaldos)
                                .addGap(0, 0, Short.MAX_VALUE)))))
                .addContainerGap())
        );

        layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {botonCpu, botonRespaldos, botonTablespaces, botonUsuarios});

        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel1)
                .addGap(18, 18, 18)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(botonTablespaces)
                    .addComponent(botonCpu))
                .addGap(18, 18, 18)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(botonUsuarios)
                    .addComponent(botonRespaldos))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        layout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {botonCpu, botonRespaldos, botonTablespaces, botonUsuarios});

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void botonTablespacesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_botonTablespacesActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_botonTablespacesActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(VistaSeleccionMonitor.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(VistaSeleccionMonitor.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(VistaSeleccionMonitor.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(VistaSeleccionMonitor.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new VistaSeleccionMonitor().setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton botonCpu;
    private javax.swing.JButton botonRespaldos;
    private javax.swing.JButton botonTablespaces;
    private javax.swing.JButton botonUsuarios;
    private javax.swing.JMenuItem itemAcercaDe;
    private javax.swing.JMenuItem itemCerrar;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JMenuBar jMenuBar1;
    private javax.swing.JMenu menuArchivo;
    private javax.swing.JMenu menuAyuda;
    // End of variables declaration//GEN-END:variables
}
